//0.导入axios
import Vue from 'vue'
import axios from 'axios'
import VueAxios from 'vue-axios'
import { deflate } from 'zlib';
Vue.use(VueAxios, axios)

//1.创建instance

const instance = axios.create({
  baseURL: 'http://toutiao.itheima.net',
  timeout: 10000,
})



//2.封装接口

function userLogin(mobile,code){
    return instance({
        url:'/v1_0/authorizations',
        method:'post',
        data:{
            mobile,code
        }
    })
}

//导出接口
export { userLogin }



